import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
/**
 * 组织管理:
 *  员工
 *  部门
 *  店铺
 */
import Department from './views/org/Department.vue'
import Employee from './views/org/Employee.vue'
import echarts from './views/charts/echarts.vue'
import Shop from './views/org/Shop.vue'
/**
 * 店铺入驻
 */
import ShopRegister from './views/ShopRegister.vue'

/**
 * 车辆管理：
 *  车辆类型
 */
import CarType from './views/car/CarType.vue'
import Car from './views/car/Car.vue'

/**
 * 系统管理:
 *  系统配置
 *  数据字典
 *  数据字典明细
 */
import Sysconfig from './views/sysmanage/Sysconfig.vue'
import Dictionary from './views/sysmanage/Dictionary.vue'
import DictionaryItem from './views/sysmanage/DictionaryItem.vue'

/**
 * 产品管理
 *  产品展示
 *  产品类型
 */
import Products from './views/product/Products.vue'
import ProductType from './views/product/ProductType.vue'
/**
 * 营销管理
 *  活动
 *  活动备注
 *  线索
 *  线索备注
 *  商机
 */
import Activities from './views/market/Activities.vue'
import ActivityRemark from './views/market/ActivityRemark.vue'
import Clue from './views/market/Clue.vue'
import ClueRemark from './views/market/ClueRemark.vue'
import Business from './views/market/Business.vue'

/**
 * 订单管理
 */
import Orders from './views/order/Orders.vue'
let routes = [
    {
        path: '/login',
        component: Login,
        name: '登录',
        hidden: true
    },

    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '店铺入驻',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '错误页面',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '主页',
        iconCls: 'fa fa-bar-chart',
        leaf:true, //没有儿子
        children: [
            { path: '/echarts', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理'},
            { path: '/shop', component: Shop, name: '店铺管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '车辆管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/carType', component: CarType, name: '车辆类型管理'},
            { path: '/car', component: Car, name: '车辆管理'},
            { path: '/carAudit', component: Car, name: '车辆审核日志'}

        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/sysconfig', component: Sysconfig, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/dictionaryItem', component: DictionaryItem, name: '数据字典明细' }
        ]
    },

    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/products', component: Products, name: '产品展示' },
            { path: '/productType', component: ProductType, name: '产品类型' },
        ]
    },

    {
        path: '/',
        component: Home,
        name: '营销管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/activities', component: Activities, name: '营销活动' },
            { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
            { path: '/clue', component: Clue, name: '线索管理' },
            { path: '/clueRemark', component: ClueRemark, name: '线索备注' },
            { path: '/business', component: Business, name: '商机管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/orders', component: Orders, name: '订单展示' },
            { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
            { path: '/clue', component: Clue, name: '线索管理' },
            { path: '/clueRemark', component: ClueRemark, name: '线索备注' },
            { path: '/business', component: Business, name: '商机管理' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;